package com.tertyshniy.portlet.controllers;

import com.tertyshniy.portlet.model.services.FakeDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.portlet.ModelAndView;

import java.util.HashMap;
import java.util.Map;
     /**
 * okay Controller
 * @author Dimon
 *
 */
@Controller
public class okayController {
    @Autowired
    FakeDataService fakeDataService;

    @RequestMapping("view")
    public ModelAndView handleRenderRequest()  {


		Map<String, Object> model = new HashMap<String, Object>();
        fakeDataService.createFakeData("777","Джигурда","1");
        model.put("Message3",fakeDataService.findFakeData("777").toString());
		return new ModelAndView("view", model);
	}
}

